﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MediaGarden.Formats;
using MediaGarden.Playlists.Services;

namespace MediaGarden.Playlists.Formats
{
    /// <summary>
    /// Abstract class to implement for JSON playlist
    /// </summary>
    public abstract class JsonPlaylistFormat : MimeMediaFormat, IPlaylistFormat
    {
        public string WriterName
        {
            get { return "Json"; }
        }

        public override string MediaStereotype
        {
            get { return "Playlist"; }
        }

        public override IEnumerable<string> FileExtensions()
        {
            return new[]{
                "js","html","json"};
        }

        public override IEnumerable<string> MimeTypes()
        {
            return new[] {
                "application/json",
                "application/x-javascript",
                "text/javascript",
                "text/x-javascript",
                "text/x-json"
            };
        }

    }
}